/**
 * 
 */
package com.guogee.util;

import java.util.Date;

/**
 *@ClassName:     Log.java
 * @Description:   TODO
 * @author xieguangwei
 * @date 2014-11-20
 * 
 */
public class Log {
	enum Level{
		verbose,
		debug,
		info,
		warn,
		error,
	}
	private static Level l = BuildHelper.getLogLevel();
    public static void i(String msg){
    	if(l != Level.info && l != Level.verbose)
    		return;
    	print(msg);
    }
    
    public static void d(String msg){
    	if(l != Level.debug && l != Level.verbose)
    		return;
    	print(msg);
    }
    public static void e(String msg){
    	if(l != Level.error && l != Level.verbose)
    		return;
    	print("error:" + msg);
    }
    
    private static void print(String msg){
    	Date date = new Date();
    	System.out.println( date.toString() + " "+ msg);
    }
}
